class List<T> {
  list: T[];
  constructor(value: Array<T>) {
    this.list = value;
  }
  ListEmpty() {
    return this.list.length === 0;
  }
  ClearList() {
    this.list.length = 0;
  }
  GetElem(i: number) {
    return this.list[i];
  }
  LocateElem(e: any) {
    this.list.indexOf(e);
  }
  Insert(i: number, e: any) {
    this.list.splice(i, 1, e);
  }
  Delete(i: number) {
    return this.list.splice(i, 1);
  }
  Length() {
    return this.list.length;
  }
}
